As users impose increasingly high requirements on images, electronic terminals provide many new functions for the users to meet user demands. For example, a user can overlay multiple photos. The user may overlay a static image and another static image, or may overlay a dynamic image and a static image, so that an effect that the user is satisfied with is achieved by overlaying different images. Currently, if a user wants to overlay a dynamic image and a static image, the user needs to preprocess the static image before overlaying the images. However, a process of preprocessing a static image generally may reduce image quality of the static image. For example, a dynamic Graphics Interchange Format (GIF) image is generated by overlaying a static image and a dynamic image, where the GIF image is in 8-bit color, but the static image is generally in true color. During overlay, the true color static image needs to be converted into an 8-bit color image. Colors included in the 8-bit color image are less than colors included in the true color image. Consequently, image quality of the converted static image is inevitably reduced, and an effect that the user is satisfied with cannot be achieved.